Optimal. Leaf size=97 \[ -\frac{3 a^2 c^3 \tanh ^{-1}(\sin (e+f x))}{8 f}+\frac{a^2 \tan ^3(e+f x) \left (4 c^3-3 c^3 \sec (e+f x)\right )}{12 f}-\frac{a^2 \tan (e+f x) \left (8 c^3-3 c^3 \sec (e+f x)\right )}{8 f}+a^2 c^3 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.117992, antiderivative size = 97, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 3, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.115, Rules used = {3904, 3881, 3770} \[ -\frac{3 a^2 c^3 \tanh ^{-1}(\sin (e+f x))}{8 f}+\frac{a^2 \tan ^3(e+f x) \left (4 c^3-3 c^3 \sec (e+f x)\right )}{12 f}-\frac{a^2 \tan (e+f x) \left (8 c^3-3 c^3 \sec (e+f x)\right )}{8 f}+a^2 c^3 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3904
Rule 3881
Rule 3770
Rubi steps
\begin{align*} \int (a+a \sec (e+f x))^2 (c-c \sec (e+f x))^3 \, dx &=\left (a^2 c^2\right ) \int (c-c \sec (e+f x)) \tan ^4(e+f x) \, dx\\ &=\frac{a^2 \left (4 c^3-3 c^3 \sec (e+f x)\right ) \tan ^3(e+f x)}{12 f}-\frac{1}{4} \left (a^2 c^2\right ) \int (4 c-3 c \sec (e+f x)) \tan ^2(e+f x) \, dx\\ &=-\frac{a^2 \left (8 c^3-3 c^3 \sec (e+f x)\right ) \tan (e+f x)}{8 f}+\frac{a^2 \left (4 c^3-3 c^3 \sec (e+f x)\right ) \tan ^3(e+f x)}{12 f}+\frac{1}{8} \left (a^2 c^2\right ) \int (8 c-3 c \sec (e+f x)) \, dx\\ &=a^2 c^3 x-\frac{a^2 \left (8 c^3-3 c^3 \sec (e+f x)\right ) \tan (e+f x)}{8 f}+\frac{a^2 \left (4 c^3-3 c^3 \sec (e+f x)\right ) \tan ^3(e+f x)}{12 f}-\frac{1}{8} \left (3 a^2 c^3\right ) \int \sec (e+f x) \, dx\\ &=a^2 c^3 x-\frac{3 a^2 c^3 \tanh ^{-1}(\sin (e+f x))}{8 f}-\frac{a^2 \left (8 c^3-3 c^3 \sec (e+f x)\right ) \tan (e+f x)}{8 f}+\frac{a^2 \left (4 c^3-3 c^3 \sec (e+f x)\right ) \tan ^3(e+f x)}{12 f}\\ \end{align*}
Mathematica [A] time = 0.737631, size = 122, normalized size = 1.26 \[ \frac{a^2 c^3 \sec ^4(e+f x) \left (-18 \sin (e+f x)-32 \sin (2 (e+f x))+30 \sin (3 (e+f x))-32 \sin (4 (e+f x))+96 (e+f x) \cos (2 (e+f x))+24 e \cos (4 (e+f x))+24 f x \cos (4 (e+f x))-72 \cos ^4(e+f x) \tanh ^{-1}(\sin (e+f x))+72 e+72 f x\right )}{192 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.025, size = 136, normalized size = 1.4 \begin{align*}{\frac{5\,{c}^{3}{a}^{2}\sec \left ( fx+e \right ) \tan \left ( fx+e \right ) }{8\,f}}-{\frac{3\,{c}^{3}{a}^{2}\ln \left ( \sec \left ( fx+e \right ) +\tan \left ( fx+e \right ) \right ) }{8\,f}}-{\frac{4\,{c}^{3}{a}^{2}\tan \left ( fx+e \right ) }{3\,f}}+{a}^{2}{c}^{3}x+{\frac{{a}^{2}{c}^{3}e}{f}}+{\frac{{c}^{3}{a}^{2}\tan \left ( fx+e \right ) \left ( \sec \left ( fx+e \right ) \right ) ^{2}}{3\,f}}-{\frac{{c}^{3}{a}^{2}\tan \left ( fx+e \right ) \left ( \sec \left ( fx+e \right ) \right ) ^{3}}{4\,f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.0294, size = 274, normalized size = 2.82 \begin{align*} \frac{16 \,{\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} a^{2} c^{3} + 48 \,{\left (f x + e\right )} a^{2} c^{3} + 3 \, a^{2} c^{3}{\left (\frac{2 \,{\left (3 \, \sin \left (f x + e\right )^{3} - 5 \, \sin \left (f x + e\right )\right )}}{\sin \left (f x + e\right )^{4} - 2 \, \sin \left (f x + e\right )^{2} + 1} - 3 \, \log \left (\sin \left (f x + e\right ) + 1\right ) + 3 \, \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 24 \, a^{2} c^{3}{\left (\frac{2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 48 \, a^{2} c^{3} \log \left (\sec \left (f x + e\right ) + \tan \left (f x + e\right )\right ) - 96 \, a^{2} c^{3} \tan \left (f x + e\right )}{48 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.16392, size = 359, normalized size = 3.7 \begin{align*} \frac{48 \, a^{2} c^{3} f x \cos \left (f x + e\right )^{4} - 9 \, a^{2} c^{3} \cos \left (f x + e\right )^{4} \log \left (\sin \left (f x + e\right ) + 1\right ) + 9 \, a^{2} c^{3} \cos \left (f x + e\right )^{4} \log \left (-\sin \left (f x + e\right ) + 1\right ) - 2 \,{\left (32 \, a^{2} c^{3} \cos \left (f x + e\right )^{3} - 15 \, a^{2} c^{3} \cos \left (f x + e\right )^{2} - 8 \, a^{2} c^{3} \cos \left (f x + e\right ) + 6 \, a^{2} c^{3}\right )} \sin \left (f x + e\right )}{48 \, f \cos \left (f x + e\right )^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} - a^{2} c^{3} \left (\int \left (-1\right )\, dx + \int \sec{\left (e + f x \right )}\, dx + \int 2 \sec ^{2}{\left (e + f x \right )}\, dx + \int - 2 \sec ^{3}{\left (e + f x \right )}\, dx + \int - \sec ^{4}{\left (e + f x \right )}\, dx + \int \sec ^{5}{\left (e + f x \right )}\, dx\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.51961, size = 217, normalized size = 2.24 \begin{align*} \frac{24 \,{\left (f x + e\right )} a^{2} c^{3} - 9 \, a^{2} c^{3} \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 1 \right |}\right ) + 9 \, a^{2} c^{3} \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1 \right |}\right ) + \frac{2 \,{\left (33 \, a^{2} c^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{7} - 137 \, a^{2} c^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{5} + 71 \, a^{2} c^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - 15 \, a^{2} c^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )\right )}}{{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - 1\right )}^{4}}}{24 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]